function autococo(){

    $.ajax({
        url: "https://airvf.com/cocoinfo/Raspberry.php",
        success: function(result){
            $("#cocobgid2").css("display","none");
            $("#cocobgid").css("display","block");
            var obj=JSON.parse(result);
            $("#info1").html(obj['info1']);
            $("#info2").html(obj['info2']);
            $("#info3").html(obj['info3']);
            $("#info4").html(obj['info4']);

            var randNum =  Math.floor(Math.random() * 9) + 1;
               if(obj['bg']){     
            $("#vvv").attr("src",obj['bg']);
             }else{
                $("#vvv").attr("src","src/"+String(obj['tqst'])+".mp4");
             }
        },
        error: function(xhr,status,error){
        // 在获取数据失败的情况下，执行这里的代码
           if(status=='error'){
               $("#cocobgid").css("display","none");
               $("#cocobgid2").css("display","block");
               var randNum =  Math.floor(Math.random() * 9) + 1;
                    
               $("#vvv").attr("src","src/"+String(randNum)+".mp4");
                
           }
        }
        });
}
setInterval(function(){

    autococo();

},1000*180);
autococo();
$("#cocobgid").css("display","none");
let time = +new Date() //获取当前时间戳
    function getFamtterTimer(time) { //传入时间
        let date = new Date(time),
            Y = date.getFullYear(), // 年  
            M = date.getMonth() + 1, //月  
            D = date.getDate(), //日
            h = date.getHours(), //小时
            m = date.getMinutes(), //分钟
            s = date.getSeconds(); //秒数
        document.getElementById("time").innerHTML = Y + '年' + getZero(M) + '月' + getZero(D) + '日 ' + getZero(h) + ':' +
            getZero(m) + ':' + getZero(s);
            document.getElementById("time2").innerHTML = Y + '年' + getZero(M) + '月' + getZero(D) + '日 ' + getZero(h) + ':' +
            getZero(m) + ':' + getZero(s);
    }
    function getZero(num) { // 个位数前补0
        if (parseInt(num) < 10) {
            num = '0' + num;
        }
        return num;
    }
    setInterval("getFamtterTimer(+new Date())", 1000);

    document.oncontextmenu = function(){
        event.returnValue = false;
    }
    document.oncopy = function(){
        event.returnValue = false;
    }
    document.onselectstart = function(){
        event.returnValue = false;
    }